﻿using ScFramework.Core;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VolumetricLines;

public class Frame : MonoBehaviour
{
   public float l;

    public void SetPoint(List<Vector2> points,float scale)
    {
        Debug.Assert(points.Count == 3);
        for (int i = 0; i < 3; i++)
        {
            transform.GetChild(i).GetComponent<VolumetricLineBehavior>().SetStartAndEndPoints(points[i], points[(i + 1) % 3]);
            transform.GetChild(i).GetComponent<VolumetricLineBehavior>().LineWidth = l* scale;
        }
        
    }

    private void LateUpdate()
    {
        transform.localScale = Main.Map.localScale;
    }

}
